Optical imaging techniques generate images of targets such as portions of a body, e.g., the interior of an eye. Examples of such techniques include interferometric imaging (e.g., optical coherence tomography (OCT)), spectroscopic imaging (e.g., fluorescence), Raman imaging, diffuse-wave optical imaging, and two-photon imaging techniques. Certain techniques, such as the interferometric imaging techniques, use a scanning system to scan a light ray across the target to image the target. Optical elements such as mirrors and lenses may be used to move the light ray.